<?php
$this->subtitulo = "Contactenos";
$this->pageTitle=Yii::app()->name . ' - Contactenos';
$this->breadcrumbs=array(
	'Contacto',
);
?>

<?php if(Yii::app()->user->hasFlash('contact')): ?>

<div class="flash-success">
	<?php echo Yii::app()->user->getFlash('contact'); ?>
</div>

<?php else: ?>


<div class="form">

<?php $form=$this->beginWidget('CActiveForm'); ?>

	<div class="message info">Campos con * son requeridos.</div>


	<p>
		<?php echo $form->labelEx($model,'name'); ?>
            <br/>
		<?php echo $form->textField($model,'name',array('class' => 'text small')); ?>
                <?php echo Nhtml::error($model,'name',array('class'=>'note error'))?>
	</p>

	<p>
		<?php echo $form->labelEx($model,'email'); ?><br/>
		<?php echo $form->textField($model,'email',array('class' => 'text small')); ?>
                <?php echo Nhtml::error($model,'email',array('class'=>'note error'))?>
	</p>

	<p>
		<?php echo $form->labelEx($model,'subject'); ?><br/>
		<?php echo $form->textField($model,'subject',array('size'=>60,'maxlength'=>128, 'class' => 'text small')); ?>
                <?php echo Nhtml::error($model,'subject',array('class'=>'note error'))?>
	</p>

	<p>
		<?php echo $form->labelEx($model,'body'); ?><br/>
		<?php echo $form->textArea($model,'body',array('rows'=>6, 'cols'=>50, 'class' => 'text small')); ?>
                <?php echo Nhtml::error($model,'body',array('class'=>'note error'))?>
	</p>

	<?php if(CCaptcha::checkRequirements()): ?>
	<p>
		<?php echo $form->labelEx($model,'verifyCode'); ?><br/>
		<div>
		<?php $this->widget('CCaptcha', 
                        array(
                            'buttonLabel' => 'Obtener nuevo codigo'
                            ));
                ?><br/>
		<?php echo $form->textField($model,'verifyCode'); ?>
                <?php echo Nhtml::error($model,'verifyCode',array('class'=>'note error'))?>
		</div>
		<div class="hint">Por favor ingrese las letras como estan mostradas en la imagen de arriba.
		
	</p>
	<?php endif; ?>

	<p>
		<?php echo CHtml::submitButton('Enviar',array('class'=>'submit')); ?>
	</p>

<?php $this->endWidget(); ?>

</div><!-- form -->

<?php endif; ?>